<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - EI Power问题管理系统</title>
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/bootstrap-icons.css') }}" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
        }

        .login-card {
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .login-header {
            background: linear-gradient(45deg, #007bff, #0056b3);
            color: white;
            padding: 2rem;
            text-align: center;
        }

        .login-body {
            padding: 2rem;
        }

        .form-control {
            border-radius: 10px;
            border: 2px solid #e9ecef;
            padding: 12px 15px;
        }

        .form-control:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
        }

        .btn-login {
            background: linear-gradient(45deg, #007bff, #0056b3);
            border: none;
            border-radius: 10px;
            padding: 12px;
            font-weight: bold;
            transition: transform 0.2s;
        }

        .btn-login:hover {
            transform: translateY(-2px);
        }

        .user-info {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 1rem;
            margin-top: 1rem;
        }

        .footer {
             position: fixed;
             bottom: 0;
             left: 0;
             right: 0;
             padding: 10px 0;
             font-size: 12px;
             color: white;
             z-index: 1000;
         }

        .footer-content {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .divider {
             margin: 0 5px;
             color: white;
         }

        .footer-content img {
            width: 16px;
            height: 16px;
            margin: 0 5px;
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-6 col-lg-5">
                <div class="login-card">
                    <div class="login-header">
                        <h2><i class="bi bi-chat-square-text"></i></h2>
                        <h4>EI Power问题管理系统</h4>
                        <p class="mb-0">请使用您的账户登录</p>
                    </div>

                    <div class="login-body">
                        <!-- 消息提示 -->
                        {% with messages = get_flashed_messages() %}
                        {% if messages %}
                        {% for message in messages %}
                        <div class="alert alert-danger alert-dismissible fade show" role="alert">
                            <i class="bi bi-exclamation-triangle"></i> {{ message }}
                            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                        </div>
                        {% endfor %}
                        {% endif %}
                        {% endwith %}

                        <form method="POST">
                            <div class="mb-3">
                                <label for="username" class="form-label">
                                    <i class="bi bi-person"></i> 用户名
                                </label>
                                <input type="text" class="form-control" id="username" name="username" required>
                            </div>

                            <div class="mb-3">
                                <label for="password" class="form-label">
                                    <i class="bi bi-lock"></i> 密码
                                </label>
                                <input type="password" class="form-control" id="password" name="password" required>
                            </div>

                            <button type="submit" class="btn btn-primary btn-login w-100">
                                <i class="bi bi-box-arrow-in-right"></i> 登录
                            </button>
                        </form>

                        <!-- 用户信息提示 -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <span>&copy; 2025 EI Power - 问题管理系统 浙江机电职业技术大学&嘉兴智晤科技有限公司</span>
                <span class="divider">|</span>
                <a href="https://beian.miit.gov.cn/" target="_blank" style="color: white; text-decoration: none;">浙ICP备2025156561号</a>
                 <span class="divider">|</span>
                 <img src="https://tjh666.cn/images/headlogo.png" alt="公安备案图标" style="width: 16px; height: 16px; margin: 0 5px; vertical-align: middle;">
                 <a href="https://beian.mps.gov.cn/#/query/webSearch?code=33068302000370" rel="noreferrer" target="_blank" style="color: white; text-decoration: none;">浙公网安备33068302000370号</a>
            </div>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</body>

</html>